#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb long double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define getBit(mask, k) (((mask) / pw[k]) % pw[1])
#define setBit(mask, k, l) (((mask) / pw[k + 1] * pw[1] + (l)) * pw[k] + ((mask) % pw[k]))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define ff first
#define ss second 
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int inf = 1 << 28;
const ldb pi = fabsl(atan2l(0.0, -1.0));
using namespace std;

int N, L, X, K;
LL result;


void load()
{
	cin >> N >> L >> X >> K;
}

int mask[6];
const LL mod = 1000000007;

void extGcd(LL a, LL b, LL &x, LL &y)
{
	if (b == 0)
	{
		x = 1;
		y = 0;
	}
	else
	{
		LL x1, y1;
		extGcd(b, a % b, x1, y1);
		x = y1;
		y = x1 - (a / b) * y1;
	}
}

LL invMod(LL a, LL n)
{
	LL x, y;
	extGcd(a, n, x, y);
	x %= n;
	x += n;
	x %= n;
	return x;
}

void upd()
{
	for (int i = 0; i < 5; i++)
	{
		cerr << mask[i] << " ";
	}
	cerr << "\n";
	LL t = 1;
	int m = mask[4] + 1;
	for (int i = X - m + 1; i <= X; i++)
	{
		t *= i;
		t %= mod;
	}
	for (int i = 2; i <= m; i++)
	{
		t *= invMod(i, mod);
		t %= mod;
	}
 	result += t;
}

void go(int i)
{
	if (i == 5)
	{
		upd();
		return;
	}
	int j = 0;
	if (i)
		j = mask[i - 1] + 1;
	for (int k = 1; i + k <= 5 && k <= K; k++)
	{
		mask[i + k - 1] = j;
		go(i + k);
	}
}

void solve()
{
	go(0);
	cout << (result * (N - L + 1)) % mod;
}

#define file "hexagons"
int main()
{
	#ifndef ONLINE_JUDGE
		freopen(file".in", "rt", stdin);
		freopen(file".out", "wt", stdout);
	#endif
	load();
	solve();
	return 0;
}
